Skip to content

Move GreedyQubitManager from Cirq-FT to Cirq-Core#6309

Merged
tanujkhattar merged 5 commits intoquantumlib:masterfrom
tanujkhattar:greedy_qm_to_cirq_core
Oct 6, 2023
Merged

Move GreedyQubitManager from Cirq-FT to Cirq-Core#6309
tanujkhattar merged 5 commits intoquantumlib:masterfrom
tanujkhattar:greedy_qm_to_cirq_core

Conversation

@tanujkhattar
Copy link
Copy Markdown
Collaborator

Part of Cirq-FT and Qualtran integration.

@tanujkhattar tanujkhattar added BREAKING CHANGE For pull requests that are important to mention in release notes. area/cirq-ft Issues related to the Cirq-FT sub-package labels Oct 4, 2023
@tanujkhattar tanujkhattar requested review from a team, cduck and vtomole as code owners October 4, 2023 21:30
@CirqBot CirqBot added the size: L 250< lines changed <1000 label Oct 4, 2023
Comment on lines +52 to +53
self._used_qubits: Set['cirq.Qid'] = set()
self._free_qubits: List['cirq.Qid'] = []
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let the record reflect that I tried to actually verify that this is just a move but you've changed a few things :p including quoting the types now

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting the types was necessary because earlier, in Cirq-FT, we could just do import cirq but now we either need to import the submodules or put import cirq under if TYPE_CHECKING and quote the types.

This should be the only change, I haven't made any logic changes as part of the move.

@tanujkhattar tanujkhattar enabled auto-merge (squash) October 6, 2023 21:30
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 6, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (87f77be) 97.89% compared to head (d81fb26) 97.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6309      +/-   ##
==========================================
- Coverage   97.89%   97.89%   -0.01%     
==========================================
  Files        1104     1106       +2     
  Lines       96134    96152      +18     
==========================================
+ Hits        94113    94130      +17     
- Misses       2021     2022       +1     
Files Coverage Δ
cirq-core/cirq/__init__.py 100.00% <ø> (ø)
cirq-core/cirq/ops/__init__.py 100.00% <100.00%> (ø)
cirq-core/cirq/ops/greedy_qubit_manager_test.py 100.00% <100.00%> (ø)
cirq-core/cirq/protocols/json_test_data/spec.py 100.00% <ø> (ø)
cirq-ft/cirq_ft/__init__.py 100.00% <ø> (ø)
...-ft/cirq_ft/algos/apply_gate_to_lth_target_test.py 100.00% <100.00%> (ø)
cirq-ft/cirq_ft/algos/arithmetic_gates_test.py 100.00% <100.00%> (ø)
..._ft/algos/programmable_rotation_gate_array_test.py 100.00% <100.00%> (ø)
cirq-ft/cirq_ft/algos/qrom_test.py 100.00% <100.00%> (ø)
...t/cirq_ft/algos/qubitization_walk_operator_test.py 100.00% <100.00%> (ø)
... and 12 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tanujkhattar tanujkhattar merged commit fee056e into quantumlib:master Oct 6, 2023
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Move GreedyQubitManager from Cirq-FT to Cirq-Core

* Mark Cirq-FT qubit manager as deprecated

* Fix tests

* Fix coverage test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cirq-ft Issues related to the Cirq-FT sub-package BREAKING CHANGE For pull requests that are important to mention in release notes. size: L 250< lines changed <1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants